package com.ly.erms.core.log;

import java.io.Serializable;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import org.springframework.web.context.WebApplicationContext;

import com.ly.erms.core.util.SpringContextHolder;

/**
 * 被修改的bean 临时存放的地方
 * @author liuyang
 * @date 2018年1月3日
 */
@Component
@Scope(scopeName=WebApplicationContext.SCOPE_SESSION)
public class LogObjectHolder implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = -3203753024154476068L;
	private Object object = null;
	
	public void set(Object obj){
		this.object = obj;
	}
	
	public Object get(){
		return object;
	}
	
	public static LogObjectHolder me(){
		LogObjectHolder bean = SpringContextHolder.getBean(LogObjectHolder.class);
		return bean;
	}
}
